<?php

namespace Wcent\Controller;

#use Think\Controller;

class UcentController extends CommController
{
    private function controls()
    {
        if (session("cdk") == null) {
            $this->redirect("Index/index");
        }
    }

    public function index()
    {
        $this->controls();
        $ocr = D("ocr");
        $info = $ocr->getSaledata(session("cdk"), 0);
        $this->assign("info", $info);
        $this->display();
    }
    
    public function cashs()
    {
        $this->controls();
        $ocr = D("ocr");
        $info = $ocr->getSaledata(session("cdk"), 1);
        $this->assign("info", $info);
        $this->display();
    }

    public function pinfo()
    {
        $this->controls();
        $ocr = D("ocr");
        $this->assign("info", $ocr->getUserinfo(session("cdk")));
        $this->display();
    }
}
